<{include file="public/header.html"}>
<div class="nloan-lists">
    <header class="bj-white follow-head">
        <a href="javascript:history.back(-1);" class="icon-return iconfont iconfont-top iconfont-left"></a>
        <h1 class="bar-title">找贷款</h1>
    </header>
    <div class="mt50 nlists">
        <div class="nav-list">
            <dl id="top-menu" class="topmenu f-cb">
                <dt>
                    <div class="selectlist">
                        <div class="select_textdiv">
                            <input type="hidden" value="" id="amount_id">
                            <p class="s_text">金额不限</p><span class="down iconfont">&#xe633;</span>
                        </div>
                        <div class="select_textul" style="width: 980px; display: none;">
                            <ul class="select_first_ul" name="amount_id">

                                <li>
                                    <p style="width: 100%;" itemid="0">金额不限</p>
                                </li>
                                <{foreach from=$amount_type item=val}>
                                <li>
                                    <p style="width: 100%;" itemid="<{$val['id']}>"><{$val['title']}></p>
                                </li>
                                <{/foreach}>
                            </ul>
                        </div>
                    </div>
                </dt>
                <dt>
                    <div class="selectlist">
                        <div class="select_textdiv">
                            <input type="hidden" value="" id="period_id">
                            <p class="s_text">期限不限</p><span class="down iconfont">&#xe633;</span>
                        </div>
                        <div class="select_textul" style="width: 980px; display: none;">
                            <ul class="select_first_ul" name="period_id">
                                <li>
                                    <p style="width: 100%;" itemid="0">期限不限</p>
                                </li>
                                <{foreach from=$period_type item=val}>
                                <li>
                                    <p style="width: 100%;" itemid="<{$val['id']}>"><{$val['title']}></p>
                                </li>
                                <{/foreach}>
                            </ul>
                        </div>
                    </div>
                </dt>
                <dt>
                    <div class="selectlist">
                        <div class="select_textdiv divfocus">
                            <input type="hidden" value="" id="lend_id">
                            <p class="s_text">类型不限</p><span class="down iconfont">&#xe633;</span>
                        </div>
                        <div class="select_textul" style="width: 980px; display: none;">
                            <ul class="select_first_ul" name="lend_id">
                                <li>
                                    <p style="width: 100%;" itemid="0">类型不限</p>
                                </li>
                                <{foreach from=$lend_type item=val}>
                                <li>
                                    <p style="width: 100%;" itemid="<{$val['id']}>"><{$val['title']}></p>
                                </li>
                                <{/foreach}>
                            </ul>
                        </div>
                    </div>
                </dt>
                <dt>
                    <div class="selectlist">
                        <div class="select_textdiv divfocus">
                            <input type="hidden" value="" id="orderby">
                            <p class="s_text">综合排序</p><span class="down iconfont">&#xe633;</span>
                        </div>
                        <div class="select_textul" style="width: 980px; display: none;">
                            <ul class="select_first_ul" name="orderby">
                                <li>
                                    <p style="width: 100%;" itemid="0">综合排序</p>
                                </li>
                                <li>
                                    <p style="width: 100%;" itemid="amount">额度由高-低</p>
                                </li>
                                <li>
                                    <p style="width: 100%;" itemid="rate">利率由低-高</p>
                                </li>
                                <li>
                                    <p style="width: 100%;" itemid="tip">放款速度</p>
                                </li>
                            </ul>
                        </div>
                    </div>
                </dt>
            </dl>
        </div>
        <div class="all-lists" >
            <ul id="content-list" class="hot-lists">
                <{foreach from=$list item=val}>
                <li>
                    <a class="f-cb" href="<{$val['detail_url']}>">
                        <img src="<{$val['logo_small']}>" alt="" class="fl">
                        <div class="fl txt">
                            <h5><{$val['name_ch']}></h5>
                            <p><{$val['tip_list']}></p>
                            <p>额度：<span><{$val['amount_area']}>元</span>参考利率：<span><{$val['rate_str']}>/天</span></p>
                        </div>
                        <div class="go iconfont fr"></div>
                    </a>
                </li>
                <{/foreach}>
            </ul>
            <div class="loading" id="noresults" <{if $list}>style="display: none;"<{/if}>>
             <a href="javascript:;" class="load-success empty-follow-data">没有任何数据哦</a>
            </div>
            <div class="loading" id="loading"  style="display: none;">
                <a class="/*pull-load*/ load-success" href="javascript:;">加载中...</a>
            </div>
            <div class="loading" id="nomoreresults" style="display: none;">
                <a href="javascript:;" class="load-success nomore-load">已经到底啦~~~</a>
            </div>
        </div>

    </div>
</div>

<script type="text/javascript" src="/static/js/scrollpagination.js"></script>
<script type="text/javascript">
    $(function(){
        var currentPage = 0;
        $('#content-list').scrollPagination({
            'contentPage': "/ajax/ajax_search_more_loan_json_new",
            'contentData': {
                'amount_id': LOAN_CIG.amountId,
                'period_id':LOAN_CIG.periodId,
                'lend_id':LOAN_CIG.lendType,
                'orderby': LOAN_CIG.orderBy,
                'pageIndex': LOAN_CIG.pageIndex
            },
            'scrollTarget': $(window),
            'heightOffset': 0,
            'beforeLoad': function() { // before load function, you can display a preloader div
                $('#loading').fadeIn('fast');
                $('#loading').attr('scrollpagination','disabled');
            },
            'afterLoad': function(elementsLoaded) { // after loading content, you can use this function to animate your new elements
                $('#loading').fadeOut('fast');
                $('#loading').attr('scrollpagination','enabled');
                if (elementsLoaded.length == 0) {
                    $('#nomoreresults').fadeIn('slow');
                    $('#content-list').stopScrollPagination();
                }else{
                    currentPage = currentPage + 1;
                }
                if($('#content-list').children().length == 0){
                    $('#nomoreresults').hide();
                }
                this.contentData.pageIndex = currentPage;
                $(elementsLoaded).fadeInWithDelay();
            }
        });
        $.fn.fadeInWithDelay = function() {
            var delay = 0;
            return this.each(function() {
                $(this).delay(delay).animate({
                    opacity: 1
                }, 200);
                delay += 100;
            });
        };
    });
</script>
<script type="text/javascript" src="/static/js/loan-min-1.0.js"></script>


<{include file="public/footer.html"}>